/**
 * 
 */
jQuery(function($) {
	postAZt = function(titleid, tyle) {
		var title = $("#" + titleid).val();
		$.ajax({
			type : "post",
			url : "PutSorCServlet",
			data : {
				tyle : tyle,
				titleid : title
			},
			dateType : "json",
			success : function(data) {
				var jsondata = eval('(' + data + ')');
				if (jsondata.isSuccess == "true") {
					if (confirm("添加 成功!")) {
						window.location.reload();
					}
				} else {
					confirm("添加 失败！请重试...");
				}
			},
			error : function() {
				// TODO do something

			}
		});
	}
	postAClass = function(tid,in_id,rid,sid,sp_id,tyle) {
		var ctitle=$("#"+tid).val();
		var cIntro=$("#"+in_id).val();
		var crule=$("#"+rid).val();
		var icon_select=$("#"+sid).val();
		$.ajax({
			type : "post",
			url : "PutSorCServlet",
			data : {ctitle:ctitle,cIntro:cIntro,crule:crule,icon_select:icon_select,sp_id:sp_id,tyle:tyle},
			dateType : "json",
			success : function(data) {
				var jsondata = eval('(' + data + ')');
				if (jsondata.isSuccess == "true") {
					if (confirm("添加 成功!")) {
						window.location.reload();
					}
				} else {
					confirm("添加 失败！请重试...");
				}
			},
			error : function() {
				// TODO do something

			}
		});
	}
});
jQuery(function($) {
	$(function tools() {
		var timer, scrollTop, sideDiv = $(
				"<div id=\"ins\" class=\"fwinmask\" style=\"display: none; z-index: 350; right: 20px; top: 100px; position: absolute;\"></div>")
				.load("newSpecial.jsp").appendTo('body');
		$(window).scroll(function() {
			timer && clearTimeout(timer);
			scrollTop = $(this).scrollTop();
			timer = setTimeout(function() {
				sideDiv.animate({
					top : scrollTop + 100 + 'px'
				}, 600);
			}, 200);
		});
		var ctimer,cscrollTop,cEditDiv= $(
		"<div id=\"inc\" class=\"fwinmask\" style=\"display: none; z-index: 350; right: 20px; top: 100px; position: absolute;\"></div>")
		.load("newClass.jsp").appendTo('body');
		$(window).scroll(function() {
			ctimer && clearTimeout(ctimer);
			cscrollTop = $(this).scrollTop();
			ctimer = setTimeout(function() {
				cEditDiv.animate({
					top : cscrollTop + 100 + 'px'
				}, 600);
			}, 200);
		});
	});
});
function showTools(id,oid,oname) {
	if(oid!=0){
		addSpecial_id=oid;
		addSpecial_name=oname;
	}
	document.getElementById(id).style.display = "block";
}
function closeTools(id){
	document.getElementById(id).style.display = "none";
}